﻿using Microsoft.Extensions.DependencyInjection;
using Apex.Commons.ServiceRegistrationCenter;
using IdentityService.Domain.ServiceRepository;
using IdentityService.Domain.InterfaceRepository;
using IdentityService.Infrastructure.Implementations;

namespace IdentityService.Infrastructure
{
    class ModuleInitializer : IModuleInitializer
    {
        public void Initialize(IServiceCollection services)
        {
            services.AddScoped<IdDomainService>();
            services.AddScoped<IIdRepository, IdRepository>();

            // https://learn.microsoft.com/zh-cn/aspnet/core/fundamentals/http-requests?view=aspnetcore-8.0
            services.AddHttpClient();
        }
    }
}